package cn.mazexal.excelModel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: Mazexal
 * Date: 2025/5/18
 */
public class QuestionListener extends AnalysisEventListener<QuestionExcel> {

    private List<QuestionExcel> dataList = new ArrayList<>();

    @Override
    public void invoke(QuestionExcel questionExcel, AnalysisContext context) {
        if(context.readRowHolder().getRowIndex() == 0) {
            return; // 跳过首行
        }
        dataList.add(questionExcel);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
}
